﻿using CommunityToolkit.Maui.Converters;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MauiBuilder.Converters
{
    [AcceptEmptyServiceProvider]
    partial class PickerLocaleDisplayConverter : BaseConverterOneWay<Locale, string>
    {
        public override string DefaultConvertReturnValue { get; set; } = string.Empty;

        public override string ConvertFrom(Locale value, CultureInfo? culture)
        {
            if (value.Name.Contains("中文")) {

            }
            return $"{value.Language} {value.Name}";
        }
    }
}
